# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=kinfocenter
pkgver=5.14.0
pkgrel=1
pkgdesc='A utility that provides information about a computer system'
arch=(x86_64)
url='https://www.kde.org/applications/system/kinfocenter/'
license=(LGPL)
depends=(kcmutils pciutils glu libraw1394 kwayland)
makedepends=(extra-cmake-modules plasma-framework kdoctools)
groups=(plasma)
source=("https://download.kde.org/stable/plasma/$pkgver/$pkgname-$pkgver.tar.xz"{,.sig} 
        https://sources.archlinux.org/other/artwork/archlinux-artwork-1.6.tar.gz
        kcm-about-distrorc)
sha256sums=('f21e9a418619818d1b687c70e8e95675cb9709c819492f9456821bd10e93815d'
            'SKIP'
            '9c6e7faea0ed66bf6ed64b134fad6316161cf146779e4e2f4cd95c644066aab2'
            '02ae86f5ef8de5fabb97db2043065c9b6b77b7c6a71a1115161e559e39c01451')
validpgpkeys=('2D1D5B0588357787DE9EE225EC94D18F7F05997E'  # Jonathan Riddell <jr@jriddell.org>
              '0AAC775BB6437A8D9AF7A3ACFE0784117FBCE11D'  # Bhushan Shah <bshah@kde.org>
              'D07BD8662C56CB291B316EB2F5675605C74E02CF'  # David Edmundson <davidedmundson@kde.org>
              '1FA881591C26B276D7A5518EEAAF29B42A678C20') # Marco Martin <notmart@gmail.com>

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DBUILD_TESTING=OFF
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install

# Install Arch logo
  install -Dm644 "$srcdir"/archlinux-artwork-1.6/logos/archlinux-vert-dark.svg \
    "$pkgdir"/usr/share/about-distro/archlinux-logo.svg
  install -Dm644 "$srcdir"/kcm-about-distrorc "$pkgdir"/etc/xdg/kcm-about-distrorc
}
